package com.tx.boot_demo.domain;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Date;
import java.util.List;

@Component
public class ValuePerson {

    //普通变量
//    @Value("${person.lastName}")
    private String name;

    private boolean boss;

    @Value("#{ 10*4 }")
    private int age;

    private Date birthday;

    //对象或map
    private Food food;

    //集合或数组
    private List<String> lists;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isBoss() {
        return boss;
    }

    public void setBoss(boolean boss) {
        this.boss = boss;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    public Food getFood() {
        return food;
    }

    public void setFood(Food food) {
        this.food = food;
    }

    public List<String> getLists() {
        return lists;
    }

    public void setLists(List<String> lists) {
        this.lists = lists;
    }


    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "ValuePerson{" +
                "name='" + name + '\'' +
                ", boss=" + boss +
                ", age=" + age +
                ", birthday=" + birthday +
                ", food=" + food +
                ", lists=" + lists +
                '}';
    }
}